Skip to content

improv: Use lodash.merge & lodash.clonedeed instead of full lodash in Logger #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

dreamorosi
Copy link
Contributor

Description of your changes

As discussed in this comment using lodash.merge and lodash.clonedeep instead of the full package reduces the total bundle size of the Powertools logger utility.

  • Removed lodash.
  • Added lodash.merge and lodash.clonedeep.

How to verify this change

Related issues, RFCs

#139

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dreamorosi dreamorosi added dependencies Changes that touch dependencies, e.g. Dependabot, etc. logger This item relates to the Logger Utility labels Aug 3, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2021

Coverage after merging improv/logger-use-lodash-modules into main

100.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
./packages/logger/src
   Logger.ts100%100%100%100%
   helpers.ts100%100%100%100%
   index.ts100%100%100%100%
./packages/logger/src/config
   ConfigService.ts100%100%100%100%
   EnvironmentVariablesService.ts100%100%100%100%
   index.ts100%100%100%100%
./packages/logger/src/formatter
   LogFormatter.ts100%100%100%100%
   PowertoolLogFormatter.ts100%100%100%100%
   index.ts100%100%100%100%
./packages/logger/src/log
   LogItem.ts100%100%100%100%
   index.ts100%100%100%100%

Copy link
Contributor

@saragerion saragerion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Changes that touch dependencies, e.g. Dependabot, etc. logger This item relates to the Logger Utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants